<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.is.util.ParamUtil"%>
<%@page import="com.is.model.ParamClass"%>
<%@page import="com.is.util.DateTime"%>
<%@page import="com.is.control.ParamClassControl"%>
<%@page import="com.is.control.ParamStuyearControl"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../resources/css/default.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/InterStu/resources/image/favicon.ico" />
<link href="../../resources/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../resources/js/jquery-1.8.1.js"></script>
<script type="text/javascript" src="../../resources/js/jquery.artDialog.js"></script>
<script type="text/javascript" src="../../resources/js/iframeTools.js"></script>
<title>留学生预科班</title>
</head>
<body>
<%
        String class_name = ParamUtil.getString(request,"class_name");
        ParamClass pc = new ParamClass(String.valueOf(DateTime.getYear()),class_name,"@"+ParamStuyearControl.getCurrentStuyearId()+"@");
        if(ParamClassControl.insertParamClass(pc)){
        	%>
        		<script type="text/javascript">
        		$.dialog.confirm('添加班级成功！是否进入课程设置？取消则继续添加班级', function () {
        			window.location.href="../paramCourse/course.jsp";
        		}, function () {
        		    window.location=document.referrer;
        		});
        		</script>
        	<%
        } else{
	       	%>
	      		<script  type="text/javascript">
	      		 $.dialog({
				    title: '班级设定',
				    content: '由于参数填写有误或系统bug，添加班级失败！',
				    icon: 'warning',
				    ok: function(){
	           	  			history.go(-1);
				    }
				});
				</script>
	      	<%
        }
        %>
</body>
</html>
